package com.bibliotecachancay.domain;

import java.util.ArrayList;
import java.util.List;

public class RolUsuarioExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RolUsuarioExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCodRolIsNull() {
            addCriterion("COD_ROL is null");
            return (Criteria) this;
        }

        public Criteria andCodRolIsNotNull() {
            addCriterion("COD_ROL is not null");
            return (Criteria) this;
        }

        public Criteria andCodRolEqualTo(Integer value) {
            addCriterion("COD_ROL =", value, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolNotEqualTo(Integer value) {
            addCriterion("COD_ROL <>", value, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolGreaterThan(Integer value) {
            addCriterion("COD_ROL >", value, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolGreaterThanOrEqualTo(Integer value) {
            addCriterion("COD_ROL >=", value, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolLessThan(Integer value) {
            addCriterion("COD_ROL <", value, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolLessThanOrEqualTo(Integer value) {
            addCriterion("COD_ROL <=", value, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolIn(List<Integer> values) {
            addCriterion("COD_ROL in", values, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolNotIn(List<Integer> values) {
            addCriterion("COD_ROL not in", values, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolBetween(Integer value1, Integer value2) {
            addCriterion("COD_ROL between", value1, value2, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodRolNotBetween(Integer value1, Integer value2) {
            addCriterion("COD_ROL not between", value1, value2, "codRol");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioIsNull() {
            addCriterion("COD_USUARIO is null");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioIsNotNull() {
            addCriterion("COD_USUARIO is not null");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioEqualTo(Integer value) {
            addCriterion("COD_USUARIO =", value, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioNotEqualTo(Integer value) {
            addCriterion("COD_USUARIO <>", value, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioGreaterThan(Integer value) {
            addCriterion("COD_USUARIO >", value, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioGreaterThanOrEqualTo(Integer value) {
            addCriterion("COD_USUARIO >=", value, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioLessThan(Integer value) {
            addCriterion("COD_USUARIO <", value, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioLessThanOrEqualTo(Integer value) {
            addCriterion("COD_USUARIO <=", value, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioIn(List<Integer> values) {
            addCriterion("COD_USUARIO in", values, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioNotIn(List<Integer> values) {
            addCriterion("COD_USUARIO not in", values, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioBetween(Integer value1, Integer value2) {
            addCriterion("COD_USUARIO between", value1, value2, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andCodUsuarioNotBetween(Integer value1, Integer value2) {
            addCriterion("COD_USUARIO not between", value1, value2, "codUsuario");
            return (Criteria) this;
        }

        public Criteria andEstadoIsNull() {
            addCriterion("ESTADO is null");
            return (Criteria) this;
        }

        public Criteria andEstadoIsNotNull() {
            addCriterion("ESTADO is not null");
            return (Criteria) this;
        }

        public Criteria andEstadoEqualTo(String value) {
            addCriterion("ESTADO =", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotEqualTo(String value) {
            addCriterion("ESTADO <>", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoGreaterThan(String value) {
            addCriterion("ESTADO >", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoGreaterThanOrEqualTo(String value) {
            addCriterion("ESTADO >=", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoLessThan(String value) {
            addCriterion("ESTADO <", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoLessThanOrEqualTo(String value) {
            addCriterion("ESTADO <=", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoLike(String value) {
            addCriterion("ESTADO like", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotLike(String value) {
            addCriterion("ESTADO not like", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoIn(List<String> values) {
            addCriterion("ESTADO in", values, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotIn(List<String> values) {
            addCriterion("ESTADO not in", values, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoBetween(String value1, String value2) {
            addCriterion("ESTADO between", value1, value2, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotBetween(String value1, String value2) {
            addCriterion("ESTADO not between", value1, value2, "estado");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}